package com.ssy.lingxi.platform.manage.controller;

import com.ssy.lingxi.common.controller.BaseController;
import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.platform.manage.entity.base.AppDownloadLink;
import com.ssy.lingxi.platform.manage.model.request.appdownloadlink.AppDownloadLinkRequest;
import com.ssy.lingxi.platform.manage.service.IAppDownloadLinkService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.List;

/**
 * @menu 平台后台 - 系统设置 - APP链接设置
 * @author fhj
 * @version 2.0.0
 * @date 2021/04/07
 */
@Api(tags = "平台后台 - 系统设置 - APP链接设置")
@RestController
@RequestMapping("/manage/appDownloadLink")
public class AppDownloadLinkController extends BaseController {

    @Resource
    private IAppDownloadLinkService appDownloadLinkService;

    @ApiOperation(value = "获取")
    @GetMapping("/find")
    public Wrapper<List<AppDownloadLink>> find(Integer status) {
        return appDownloadLinkService.find(status);
    }

    @ApiOperation(value = "修改")
    @PostMapping(value = "/update")
    public Wrapper<Void> update(@RequestBody @Valid AppDownloadLinkRequest request) {
        return appDownloadLinkService.update(request);
    }
}
